package com.Interface.dao;

import java.util.List;
import java.util.Map;

import com.Interface.entity.TopicInfo;

public interface TopicInfoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TopicInfo record);

    int insertSelective(TopicInfo record);

    TopicInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TopicInfo record);

    int updateByPrimaryKeyWithBLOBs(TopicInfo record);

    int updateByPrimaryKey(TopicInfo record);
    
    List<TopicInfo> selectRecommend(Map<String, Object> param);//推荐
    
    List<TopicInfo> selectFlow(Map<String, Object> param);//关注
    
    List<TopicInfo> selectHot(Map<String, Object> param);//热门
    
    List<TopicInfo> selectNew(Map<String, Object> param);//最新
    
    List<TopicInfo> selectClassTopicPreview(Map<String, Object> param);
    
    //List<Map<String, Object>>selectByKeyWord(Map<String, Object> param);
    
    List<TopicInfo> selectByKeyWord(Map<String, Object> param);
    
    Map<String, Object>selectByTopicId(Map<String, Object> param);
    
    int updateTopicReadCnt(int topicId);
    
    int updateTopicCommentCnt(int topicId);
    
    int updateTopicForwardCnt(int topicId);
    
    int updateTopicThumbsCnt(int topicId);
    
    int updateTopicCollectCnt(int topicId);
    
	List<TopicInfo> selectUserTopicPreview(Map<String, Object> param);
	
	List<TopicInfo> selectUserCollectionTopicPreview(Map<String, Object> param);
	
	int updateJoinCnt(int topicId);
	
	//List<Map<String, Object>> getHotActivity(Map<String, Object> param);
	
	List<TopicInfo> getHotActivity(Map<String, Object> param);
	
	Map<String, Object> getVoteLimit(int topicId);
	
	int reduceTopicThumbsCnt(int topicId);
	
	int reduceTopicCollectCnt(int topicId);
	
	int getCountByKeyWord(Map<String, Object> param);
	
	int deleteTopic(Map<String, Object> param);
	
	int getTopicClass(Map<String, Object> param);
}